﻿/* 
  Copyright (c) SilverLining 2015
  Date:    2016-1-7
  File:    TimerState.cpp  
  Description: 

*/

#include "stdafx.h"

using namespace System;
using namespace System::Security;

#include "TimerState.h"

using namespace m;
using namespace m::alloc;

namespace SL
{
	namespace M
	{
		TimerState::TimerState()
			: _Ts(nullptr)
		{
		}

		TimerState::~TimerState()
		{
			TimerState::!TimerState();
		}

		TimerState::!TimerState()
		{
			if (_Ts)
			{
				_Ts->clear();
				_Ts->release();
			}
		}

		void TimerState::Clear()
		{
			if (_Ts)
			{
				_Ts->clear();
				_Ts->release();
				_Ts = nullptr;
			}
		}
	}
}